//
// Created by Administrator on 2021/11/2.
//
#include <vector>
#include <iostream>


using namespace std;

class Solution {
public:
    vector<int> countPoints(vector<vector<int>> &points, vector<vector<int>> &queries) {
        vector<int> ans(queries.size(), 0);
        for (int i = 0; i < queries.size(); ++i) {
            int counter = 0;
            int x = queries[i][0], y = queries[i][1], r = queries[i][2];
            for (int j = 0; j < points.size(); ++j) {
                int p_x = points[j][0], p_y = points[j][1];
                if ((x - p_x) * (x - p_x) + (y - p_y) * (y - p_y) <= r * r)
                    ++counter;
            }
            ans[i] = counter;
        }
        return ans;
    }
};

int main() {
    vector<vector<int>> points{{1, 3},
                               {3, 3},
                               {5, 3},
                               {2, 2}};
    vector<vector<int>> queries{{2, 3, 1},
                                {4, 3, 1},
                                {1, 1, 2}};
    Solution solution;
    vector<int> ans = solution.countPoints(points, queries);
    for (const int &x: ans) cout << x << endl;
    return 0;
}
